import { Component, Input } from '@angular/core';

/**
 * Generated class for the HomelistComponent component.
 *
 * See https://angular.io/api/core/Component for more info on Angular
 * Components.
 */
@Component({
  selector: 'homelist',
  templateUrl: 'homelist.html'
})
export class HomelistComponent {

  @Input('data')   data:any;
  @Input('events') events:any;

  onEvent = (event: string, item: any): void => {
		if (this.events[event]) {
			this.events[event](item);
		}
	}

  constructor() {
    console.log(this.data);
  }

}
